import globalStyles from '@/common/styles/globalStyles'
import { userInfoAtom } from '@/store/user'
import { useAtom } from 'jotai'
import React from 'react'
import { StyleSheet, Text, View } from 'react-native'

export default function HomeTips() {
    // 当前用户信息
    const [userInfo , setUserInfo] = useAtom(userInfoAtom)
    let {free_times} = userInfo.points
    return (
        <View style={[globalStyles.aiCenter , globalStyles.jcCenter , styles.tipBg]} >
            <Text style={styles.tipText}>
                请选择任意免费模板使用，您每日共有{free_times}次机会~
            </Text>
        </View>
    )
}
const styles = StyleSheet.create({
    tipBg:{
        borderRadius:12,
        backgroundColor:'#f5f5f5',
        paddingVertical:12,
        marginBottom:12
    },
    tipText:{
        fontSize:12,
        color:"#000",
        fontWeight:'600'
    }
})